const path = require('path')

module.exports = {
  publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
  productionSourceMap: false, // 关闭源码映射，减小包体积
  configureWebpack: (config) => {
    if (process.env.NODE_ENV === 'production') {
      // 生产环境配置
      config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
    }
  }
}